/* 论坛容器 */
.forum-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 论坛头部 */
.forum-header {
  height: 75px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  margin-top: 5px;
}

.forum-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.forum-create-button {
  padding: 16px 16px;
  background-color: #1989fa;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 20px;
  margin-bottom: 20px;
  margin-right: 10px;
}

.forum-create-button-text {
  color: #fff;
  font-size: 14px;
}

/* 搜索框 */
.forum-search-container {
  padding: 12px;
  background-color: #fff;
  margin-bottom: 10px;
}

.forum-searchbar {
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
}

.forum-search-input {
  flex: 1;
  background-color: transparent;
  border: none;
  outline: none;
  padding: 6px 0;
  font-size: 14px;
}

.forum-search-input-placeholder {
  color: #999;
}

/* 分类标签滚动区域 */
.forum-categories-scrollview {
  background-color: #fff;
  padding: 8px 0;
  margin-bottom: 10px;
}

.forum-categories-container {
  display: flex;
  padding: 0 12px;
}

.forum-category-item {
  padding: 6px 16px;
  margin-right: 12px;
  border-radius: 20px;
  background-color: #f0f0f0;
}

.forum-category-item.selected {
  background-color: #1989fa;
}

.forum-category-name {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.forum-category-name.selected {
  color: #fff;
}

/* 帖子列表滚动区域 */
.forum-posts-scrollview {
  flex: 1;
  padding-bottom: 20px;
}

/* 空状态 */
.forum-empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.forum-empty-text {
  color: #999;
  font-size: 14px;
}

/* 帖子项 */
.forum-post-list {
  width: 100%;
}

.forum-post-item {
  background-color: #fff;
  margin-bottom: 10px;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  animation: forum-fadeIn 0.3s ease-out;
}

.forum-post-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.forum-post-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
}

.forum-post-author-info {
  display: flex;
  flex-direction: column;
}

.forum-post-author-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 2px;
}

.forum-coach-badge {
  background-color: #ff9500;
  border-radius: 4px;
  padding: 0 6px;
  margin-left: 8px;
  display: inline-block;
  height: 16px;
  line-height: 16px;
}

.forum-coach-badge-text {
  color: #fff;
  font-size: 10px;
}

.forum-post-time {
  font-size: 12px;
  color: #999;
}

.forum-post-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.4;
}

.forum-post-content {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 帖子图片 */
.forum-post-images {
  display: flex;
  margin-bottom: 12px;
}

.forum-post-image {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  margin-right: 8px;
  object-fit: cover;
}

/* 帖子标签 */
.forum-post-tags {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.forum-post-tag {
  margin-right: 8px;
  margin-bottom: 4px;
  background-color: #f0f0f0;
  border-radius: 4px;
  padding: 2px 8px;
  display: inline-block;
}

.forum-post-tag-text {
  color: #666;
  font-size: 12px;
}

/* 帖子统计数据 */
.forum-post-stats {
  display: flex;
  align-items: center;
  border-top: 1px solid #f0f0f0;
  padding-top: 8px;
}

.forum-stat-item {
  display: flex;
  align-items: center;
  margin-right: 20px;
  font-size: 12px;
}

.forum-stat-icon {
  margin-right: 4px;
  font-size: 14px;
  width: 25px;
  height: 25px;
}

.forum-stat-text {
  color: #999;
}

/* 帖子详情页 */
.forum-post-detail {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.forum-detail-header {
  height: 60px;
  margin-bottom: 20px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.forum-cur-back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.forum-cur-back-icon {
  font-size: 18px;
  color: #333;
}

.forum-detail-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-left: 10px;
}

.forum-header-right {
  width: 30px;
}

.forum-detail-content {
  flex: 1;
  padding: 16px;
  background-color: #fff;
}

.forum-detail-post-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  line-height: 1.4;
}

.forum-detail-author-info {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.forum-detail-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 12px;
}

.forum-author-details {
  display: flex;
  flex-direction: column;
}

.forum-detail-author-name {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.forum-detail-post-time {
  font-size: 12px;
  color: #999;
}

.forum-detail-post-content {
  font-size: 15px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-wrap;
}

.forum-detail-post-images {
  margin-bottom: 20px;
}

.forum-detail-post-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 8px;
  object-fit: cover;
}

.forum-detail-post-tags {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.forum-detail-post-tag {
  margin-right: 8px;
  margin-bottom: 8px;
  background-color: #f0f0f0;
  border-radius: 4px;
  padding: 4px 10px;
  display: inline-block;
}

.forum-detail-post-tag-text {
  color: #666;
  font-size: 13px;
}

.forum-detail-post-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 16px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 20px;
}

.forum-detail-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.forum-detail-stat-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.forum-detail-stat-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 2px;
}

.forum-detail-stat-label {
  font-size: 12px;
  color: #999;
}

/* 评论区 */
.forum-comments-section {
  margin-bottom: 20px;
}

.forum-comments-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

.forum-no-comments {
  color: #999;
  font-size: 14px;
  text-align: center;
  padding: 20px 0;
}

.forum-comment-item {
  display: flex;
  margin-bottom: 16px;
  animation: forum-fadeIn 0.3s ease-out;
}

.forum-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-right: 12px;
}

.forum-comment-content {
  flex: 1;
  background-color: #f5f5f5;
  padding: 12px;
  border-radius: 8px;
}

.forum-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.forum-comment-author {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.forum-comment-time {
  font-size: 12px;
  color: #999;
}

.forum-comment-text {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

/* 评论输入框 */
.forum-comment-input-container {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  border-top: 1px solid #e0e0e0;
  padding: 12px;
  display: flex;
  align-items: center;
}

.forum-comment-input {
  flex: 1;
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  margin-right: 12px;
}

.forum-comment-input-placeholder {
  color: #999;
}

.forum-comment-send-button {
  background-color: #1989fa;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  min-width: 60px;
}

/* 创建帖子模态框 */
.forum-create-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.forum-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.forum-modal-content {
  background-color: #fff;
  border-radius: 12px 12px 0 0;
  width: 100%;
  max-height: 80vh;
  position: relative;
  z-index: 1001;
  animation: forum-slideUp 0.3s ease-out;
}

@keyframes forum-slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.forum-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.forum-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.forum-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forum-close-icon {
  font-size: 24px;
  color: #999;
}

.forum-modal-input,
.forum-modal-textarea {
  margin: 16px;
  font-size: 14px;
}

.forum-modal-input {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  width: calc(100% - 32px);
}

.forum-modal-textarea {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  width: calc(100% - 32px);
  height: 120px;
  resize: none;
}

.forum-modal-input-placeholder,
.forum-modal-textarea-placeholder {
  color: #999;
}

.forum-modal-actions {
  display: flex;
  padding: 16px;
  border-top: 1px solid #f0f0f0;
}

.forum-modal-cancel-button,
.forum-modal-confirm-button {
  flex: 1;
  margin: 0 8px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
}

.forum-modal-cancel-button {
  background-color: #f5f5f5;
  color: #666;
  border: none;
}

.forum-modal-confirm-button {
  background-color: #1989fa;
  color: #fff;
  border: none;
}

/* 响应式适配 */
@media screen and (max-width: 768px) {
  .forum-header {
    height: 75px;
    padding: 0 12px;
  }
  
  .forum-title {
    font-size: 17px;
  }
  
  .forum-create-button {
    padding: 4px 12px;
    font-size: 13px;
  }
  
  .forum-search-container {
    padding: 10px;
  }
  
  .forum-searchbar {
    padding: 4px 10px;
  }

  .forum-search-input {
    font-size: 13px;
  }
  
  .forum-post-item {
    padding: 12px;
  }
  
  .forum-post-title {
    font-size: 15px;
  }
  
  .forum-post-content {
    font-size: 13px;
  }
  
  .forum-post-image {
    width: 70px;
    height: 70px;
  }

  
  .forum-detail-title {
    font-size: 17px;
  }
  
  .forum-detail-content {
    padding: 12px;
  }
  
  .forum-detail-post-title {
    font-size: 17px;
  }
  
  .forum-detail-post-content {
    font-size: 14px;
  }
  
  .forum-comment-input-container {
    padding: 10px;
  }
}

@media screen and (max-width: 375px) {
  .forum-post-item {
    padding: 10px;
  }
  
  .forum-post-title {
    font-size: 14px;
  }
  
  .forum-post-content {
    font-size: 12px;
  }
  
  .forum-post-image {
    width: 60px;
    height: 60px;
  }
  
  .forum-detail-content {
    padding: 10px;
  }
  
  .forum-detail-post-title {
    font-size: 16px;
  }
  
  .forum-detail-post-content {
    font-size: 13px;
  }
  
  .forum-comment-input-container {
    padding: 8px;
  }
  
  .forum-comment-input {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .forum-comment-send-button {
    padding: 6px 12px;
    font-size: 13px;
    min-width: 50px;
  }
}

/* 动画效果 */
@keyframes forum-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}